import {
    Menubar,
    MenubarCheckboxItem,
    MenubarContent,
    MenubarItem,
    MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem,
    MenubarSeparator,
    MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger,
    MenubarTrigger
} from "@/components/ui/menubar";

export default function ProjectMenubar({downloadURI, bgSetting}: { downloadURI?: () => void; bgSetting?: () => void }) {
    return (
        <Menubar className="w-full">
            <MenubarMenu>
                <MenubarTrigger>文件</MenubarTrigger>
                <MenubarContent>
                    <MenubarItem onClick={bgSetting}>
                        背景设置
                    </MenubarItem>
                    <MenubarSeparator/>
                    <MenubarItem onClick={downloadURI}>
                        下载...
                    </MenubarItem>
                </MenubarContent>
            </MenubarMenu>
            <MenubarMenu>
                <MenubarTrigger>窗口</MenubarTrigger>
                <MenubarContent>
                    <MenubarCheckboxItem checked>图层</MenubarCheckboxItem>
                </MenubarContent>
            </MenubarMenu>
            <MenubarMenu>
                <MenubarTrigger>工具</MenubarTrigger>
                <MenubarContent>
                    <MenubarCheckboxItem onSelect={()=>{
                        document.body.style.cursor = "text";
                    }}>添加文本</MenubarCheckboxItem>
                </MenubarContent>
            </MenubarMenu>
        </Menubar>
    )
}